﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;

namespace DX.Learning.SimpleUserControlInsertion
{
    public partial class SimpleUserControl : DevExpress.XtraEditors.XtraUserControl
    {
        public SimpleUserControl()
        {
            InitializeComponent();
        }

        private void addressBindingNavigatorSaveItem_Click(object sender, EventArgs e)
        {
            this.Validate();
            this.addressBindingSource.EndEdit();
            this.tableAdapterManager.UpdateAll(this.schoolSystemDbDataSet);

            

        }

        private void SimpleUserControl_Load(object sender, EventArgs e)
        {
            addressTableAdapter.Fill(this.schoolSystemDbDataSet.Address);
        }
    }
}
